package routes

import (
	"ai/controllers"
	"ai/services"
	"github.com/gin-gonic/gin"
)

func SetupRoutes(router *gin.Engine) {
	// 初始化Service和Controller
	logService := services.NewLogService()
	logController := controllers.NewLogController(logService)

	// 登录路由
	router.GET("/getTrainingText", controllers.GetTrainingText)
	//router.POST("/detectEnvAndSoundQuality", controllers.DetectEnvAndSoundQuality)
	// 初始化 ApiController
	apiController := controllers.NewApiController(logService)
	router.POST("/detectEnvAndSoundQuality", apiController.DetectEnvAndSoundQuality)
	router.POST("/idCardVerification", apiController.IdCardVerification)

	riskController := controllers.NewRiskController()
	router.POST("/risk/create", riskController.CreateRisk)

	// 日志路由
	router.POST("/log", logController.CreateLog)
}
